﻿Public Class ucSalesOrderDetail
    Public Function ucValidate() As Boolean
        If txtQuantity.Text = "" Or txtDescription.Text = "" Or txtTotalAmount.Text = "" Or txtAddedFee.Text = "" Then
            MsgBox("Fields can't be blank!!")
            txtQuantity.Focus()
            Return False
        End If
        If txtQuantity.Text Like "[0-9]" Then
            MsgBox("Regular!!")
            Return True
        Else
            MsgBox("Don't Regular!!")
            txtQuantity.Text = ""
            txtQuantity.Focus()
            Return False
        End If
        If txtTotalAmount.Text Like "[0-9]" Then
            MsgBox("Regular!!")
            Return True
        Else
            MsgBox("Don't Regular!!")
            txtTotalAmount.Text = ""
            txtTotalAmount.Focus()
            Return False
        End If
        If txtAddedFee.Text Like "[0-9]" Then
            MsgBox("Regular!!")
            Return True
        Else
            MsgBox("Don't Regular!!")
            txtAddedFee.Text = ""
            txtAddedFee.Focus()
            Return False
        End If
        Return True
    End Function
End Class
